Option Explicit

Dim Doc
Set Doc = CreateObject("HL7SDK.Cda.ClinicalDocument")
Doc.Load "..\SampleCDADocument.xml"

Dim RecordTarget
Set RecordTarget = Doc.RecordTarget.Item(0)

Dim Patient
Set Patient = RecordTarget.PatientRole.Patient

Dim Name
Set Name = Patient.Name.Item(0)

Dim NamePart
Dim strName
For Each NamePart In Name.Items
  strName = strName & NamePart.Text & " "	
Next

MsgBox "Patient " + strName

Dim Component
Set Component = Doc.Component.AsStructuredBody.Component.Item(0)
MsgBox Component.Section.Title.Text & ": " & Component.Section.Text.ToString()

Set Doc = Nothing